libxl: provide full path to vif hotplug script script
authorIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 16 Mar 2011 16:44:25 +0000 (16:44 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 16 Mar 2011 16:44:25 +0000 (16:44 +0000)
commit169e4d99b1a5d84bf13e6dd6bbe4d44e246e675c
tree9b2321fc3ce346e29ae61f35ddb679d8c781b51b
parenta63cc098560710c97ff62a797d4ad25ad7fa9a96
libxl: provide full path to vif hotplug script script

This improves compatibility with xm style config files since xend does
this (see NetifController.getDeviceDetails() in
tools/python/xen/xend/server/netif.py) and
tools/hotplug/Linux/vif-setup expects an absolute path to the script.

This patch supports both absolute and relative paths in the
configuration.  Also, if somehow nic->script==NULL, don't add write
the entry to xenstore at all (rather than crashing due to the new
check for absolute vs relative path).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl.c